package executor;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Created by brossdong on 2018/1/23.
 * 自定义策略
 */
public class MyReject implements RejectedExecutionHandler {

    public MyReject() {

    }

    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println("自定义处理开始...");
        System.out.println("当前被拒绝的任务为:" + r.toString());
    }
}
